const isLogin = async (_this) => {
	let userInfo = _this.$store.state.userInfo
	if (userInfo) {
		let {
			token
		} = userInfo
		let options = {
			url: '/api/checktoken',
			header: {
				authorization: token
			}
		}
		let res = await _this.$http(options)
		if (res.data.code == 200) {
			uni.setTabBarItem({
				index: 3,
				text: '我的'
			})
			return true
		} else {
			uni.setTabBarItem({
				index: 3,
				text: '未登录'
			})
			return false
			uni.clearStorageSync('userInfo')
		}
	} else {
		uni.setTabBarItem({
			index: 3,
			text: '未登录'
		})
		return false
	}
}


export default isLogin